// 模拟地形
interface SimpleLand {
    getInstance(): Land
}

class BaseLand {
    protected birthday: number;

    protected area: number[][];
    protected canPass: boolean;

    constructor(times: number, area: number[][], canPass: boolean) {
        this.birthday = times;

        this.area = area;
        this.canPass = canPass;
    }

    getArea(): number[][] {
        return this.area;
    }

    isCanPass(): boolean {
        return this.canPass;
    }
}

class Land extends BaseLand implements SimpleLand {
    getInstance(): Land {
        return this;
    }
}

const createLand = (times: number, area: number[][], canPass: boolean): SimpleLand => {
    return new Land(times, area, canPass);
}

export type { SimpleLand };

export { createLand };